#include "CMainWindow.h"


CMainWindow::CMainWindow()
{
	if (initWindow())
		show_all_children();
}
bool CMainWindow::initWindow()
{
	set_border_width(5);
	set_size_request(50, 50);
	button = new Gtk::Button("Test");
	buttonFrame = new Gtk::Frame("Button Frame");
	buttonFrame->set_shadow_type(Gtk::ShadowType::SHADOW_IN);
	button->signal_clicked().connect(sigc::mem_fun(*this, &CMainWindow::onButtonClick));
	this->add(*buttonFrame);
	buttonFrame->add(*button);
	return true; ///implement some way to check that widgets exist
}
void CMainWindow::onButtonClick()
{
	std::cout << "Button is clicked" << std::endl;
}
CMainWindow::~CMainWindow()
{
}
